package com.cavy.platform.server.domain.message;

import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import lombok.Data;
import lombok.EqualsAndHashCode;

@EqualsAndHashCode(callSuper = true)
@Data
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type", defaultImpl = ContainerExecutedSuccessMessage.class)
@JsonSubTypes({
        @JsonSubTypes.Type(value = ContainerExecutedSuccessMessage.class),
        @JsonSubTypes.Type(value = StageExecutedErrorMessage.class),
        @JsonSubTypes.Type(value = StageExecutedSuccessMessage.class),
        @JsonSubTypes.Type(value = ContainerExecutedFailMessage.class)
})
public abstract class JobRunningMessage extends Message {
    protected String number;
    protected String pipelineName;
    protected String projectName;
    protected String workspaceName;
}
